package bpui.views;

import org.eclipse.swt.graphics.Image;
import org.wat.wcy.isi.mmazur.bp.io.NodeType;

import bpui.utils.RCPUtil;
import bpui.views.NavigationView.ObjectType;

public class TreeObject {
	protected String process;
	protected String name;
	protected TreeParent parent;
	protected ObjectType type;
	protected String id;
	protected NodeType nodeType;
	
	public TreeObject(String name) {
		this.name = name;
	}
	
	public String getId() {
		return id;
	}

	public TreeObject(String name, String id, ObjectType type, NodeType nodeType, String process) {
		super();
		this.process = process;
		this.name = name;
		this.id = id;
		this.type = type;
		this.nodeType = nodeType;
	}

	public String getName() {
		return name;
	}
	public void setParent(TreeParent parent) {
		this.parent = parent;
	}
	public TreeParent getParent() {
		return parent;
	}
	public String toString() {
		return getName();
	}
	public ObjectType getType() {
		return type;
	}
	public void setType(ObjectType type) {
		this.type = type;
	}
	
	public String getProcess() {
		return process;
	}

	public Image getImage() {
		return RCPUtil.getImage("bp-ui", "/icons/bpmn/" 
				+ nodeType.toString().toLowerCase() + ".png");
	}
}